package com.fotile.weixin.work.response.token;

import com.fotile.weixin.work.response.WeiXinResult;

import lombok.Data;

/**
 * 微信AccessToken 实体类
 *
 *
 * @version        1.0, 18/08/28
 * @author         江虹
 */
@Data
public class AccessToken extends WeiXinResult {

    /**	获取到的凭证,最长为512字节 */
    private String access_token;

    /** access_token的有效期通过返回的expires_in来传达，正常情况下为7200秒（2小时），有效期内重复获取返回相同结果，过期后获取会返回新的access_token。 */
    private Integer expires_in;

    /** Field description */
    private String refresh_token;

    /** 企业微信成员userid对应的openid */
    private String openid;

    /** Field description */
    private String scope;

    @Override
    public String toString() {
        return "AccessToken{" +
                "access_token='" + access_token + '\'' +
                ", expires_in=" + expires_in +
                ", refresh_token='" + refresh_token + '\'' +
                ", openid='" + openid + '\'' +
                ", scope='" + scope + '\'' +
                ", errcode='" + super.getErrcode() + '\'' +
                ", errmsg='" + super.getErrmsg() + '\'' +
                '}';
    }
}

